 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%>
  
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="conversation.css" rel="STYLESHEET" type="text/css">
<title>Annotate Conversation</title>
</head>
<body>
<!--        Header         -->
<jsp:include page="scripts/headerAnnotate.jsp" >
    <jsp:param name="title" value="Annotate Conversation" />
</jsp:include>
<!--       Navigation        -->
<jsp:include page="scripts/confirm.js" />
<!-- <jsp:include page="scripts/cnavigation.jsp" /> -->
<!--        Metadata         -->
<div class="meta">
<form:form  commandName="conversation">
<table>
  <tr>
    <th>Conversation ID:</th>
    <td><c:out value="${conversation.conversationId}" /></td>
  </tr>
  <tr>
    <th>Date Time:</th>
    <td><c:out value="${conversation.dateTimeEntered}" /></td>
  </tr>
  <tr>
    <th>Session Time:</th>
    <td><c:out value="${conversation.sessionTime}" /></td>
  </tr>
  <tr>
    <th>Referred By:</th>
    <td><c:out value="${conversation.referredBy}" /></td>
  </tr>
  <tr>
    <th>Assigned To:</th>
    <td><c:out value="${conversation.assignedTo}" /></td>
  </tr>
  <tr>
    <th>Number of Messages:</th>
    <td><c:out value="${conversation.numMessages}" /></td>
  </tr>
  <tr>
    <th>Number of Message Turns:</th>
    <td><c:out value="${conversation.numMessageTurns}" /></td>
  </tr>
  <c:if test="${anno_user.role == 1}">
  <tr>
    <th>Assigned Annotator(s)</th>
    <td>
    		<c:forEach items="${assignments}" var="assignment">
    		  <c:if test="${assignment.status == 0}"><font color="red"></c:if>
    		  <c:if test="${assignment.status == 1}"><font color="green"></c:if>
    		  <c:out value="${assignment.user.userName}"></c:out> 
    		  </font>
    		</c:forEach>
    </td>
  </tr>
  <tr>
    <th>Label</th>
			<td>
          <form:select path="conversationLabel.conversationLabelId" multiple="false " items="${clabels}" itemValue="conversationLabelId" itemLabel="label" />
			</td>			
		</tr>
		</c:if>
  <tr>
    <th>Note:</th>
    <td>
      <form:textarea path="note" cols="40" rows="5" />
    </td>
  </tr>
</table>
<p><input name="save" value="Save" type="submit"></p>
</form:form>
</div>
<jsp:include page="scripts/mlist.jsp">
   <jsp:param name="mode" value="annotate" />
</jsp:include>
<jsp:include page="scripts/footer.jsp" />
</body>
</html>
